import java.util.ArrayList;

public class test58 {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>();
        list.add("aaa");
        list.add("bbb");
        list.add("ccc");
     /*  删除
       String str = list.remove(1);
        System.out.println(str);*/
     /*  修改
      String result = list.set(0, "ddd");
       System.out.println(result);
        System.out.println(list);*/
       /*  查询
        String str2 = list.get(0);
        System.out.println(str2);
        System.out.println(list);*/
      //遍历
      for (int i = 0; i < list.size(); i++) {
          String str3= list.get(i);
          System.out.println(str3);
      }

    }
}
